
class B {
public:
    void funBPublic(){}

protected:
    void funcBProtected(){}

private:
    void funcBPrivate(){}
};

class C1 : B {
    void fun(){
        funBPublic();//
        funcBProtected();
        //funcBPrivate();//error: 'funcBPrivate' is a private member of 'B'
    }
};

struct C2 : B {
    void fun(){
        funBPublic();//
        funcBProtected();
        //funcBPrivate();// error: 'funcBPrivate' is a private member of 'B'
    }
};

int main(){
    C1 objC1;
    //objC1.funBPublic();// error: 'funBPublic' is a private member of 'B'（感觉这里应该说是C1的私有成员更准确些？）
    C2 objC2;
    objC2.funBPublic(); // 正常编译运行
    return 0;
}
